import { exec } from 'shelljs';
export class FeatureProject {
  // new 当前的类 就会走构造 vue / react / express
  constructor (projectType: string) {
    console.log('projectType', projectType);
    // 1. 创建项目目录
    this.createProjectFile(projectType);
  }

  private createProjectFile (projectType:string) {
    switch (projectType) {
      case 'vue':
        this.createVueProject();
        break;
      case 'react':
        // this.createReactProject();
        break;
      case 'express':
        // this.createExpressProject();
        break;
      default:
    }
  }

  private createVueProject () {
    // 1. 创建项目目录
    // 存在git仓库的模板
    exec('git clone https://gitee.com/bingyu123/vue2-template.git ./');
  }
}
